package com.ck.daoImpl;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.ck.dao.PaperDAO;
import com.ck.domain.Paper;

public class PaperDAOImpl extends SqlMapClientDaoSupport implements PaperDAO {

	public void addPaperForExam(Paper paper) {
		getSqlMapClientTemplate().insert("addPaperForExam", paper);
	}
	
	public Paper getPaperByExam(Integer exam) {
		return (Paper) getSqlMapClientTemplate().queryForObject("getPaperByExam",exam);
	}

	public Integer getPaperIdByExam(Integer exam) {
		return (Integer) getSqlMapClientTemplate().queryForObject("getPaperIdByExam",exam);
	}

}
